import Vue from 'vue';
import VueRouter from 'vue-router';
import axios from '@/util/axios';
import VueAxios from 'vue-axios';

import 'normalize.css';
import Element from 'element-ui';
import 'element-ui/lib/theme-chalk/base.css';
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';  
import moment from 'moment' 

import Tools from '@/component/tools/index.vue';
import { router } from "@/router/tools";
import { store } from '@/store/notify'

import '@/assets/scss/base.scss';
import { IeRouter } from '@/util/polyfill';

Vue.use(Element);
Vue.use(VueRouter);
Vue.component(CollapseTransition.name, CollapseTransition)
Vue.use(VueAxios, axios);

Vue.filter('formatDate', function (value) {
  if (!value) return ''
  return moment(value).format('YYYY/MM/DD')
})

export const vue: Vue = new Vue({
  el: '#app',
  router,
  store,
  render: function (createElement) {
    IeRouter.call(this)
    return createElement(Tools)
  }
})